home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 18 / CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso / CUCD / Programming / AmigaE / Src / OOmodules / library / locale / test.e < prev    next >
Encoding:
Text File  |  1996-09-20  |  537 b   |  38 lines

  1. /*
  2.  
  3. Example program for the locale object. Very simple, really. It opens an
  4. existing catalog and displays a message.
  5.  
  6. */
  7.  
  8.  
  9.  
  10. MODULE  'oomodules/library/locale'
  11.  
  12. PROC main()
  13. DEF locale:PTR TO locale
  14.  
  15.  /*
  16.   * Open the term catalog with builtin language english
  17.   */
  18.  
  19.   NEW locale.new(["ctlg", 'term.catalog'])
  20.  
  21.  
  22.  
  23.  /*
  24.   * If it's open get some strings and write the result.
  25.   */
  26.  
  27.   IF locale.catalog
  28.  
  29.     WriteF('\s\n\s\n\s\n', locale.getString(1,'bla'),
  30.       locale.getString(2,'bla'),
  31.       locale.getString(3,'bla'))
  32.  
  33.   ENDIF
  34.  
  35.  
  36.  
  37. ENDPROC
  38.